sanitizeIRR

fun sanitizeIRR(rawIRR: Double?, maxIRR: Double? = MAX_SENSIBLE_IRR): Double

Validates and sanitizes a pre-calculated IRR value.

Return

A validated and sanitized IRR value. (note: 'sanitized' result(s) will always survive kotlin Double unboxing to java double, whereas the original raw IRR may contain null)

Since

MD2027

Parameters

rawIRR

The calculated IRR value to validate (as a decimal, e.g. 0.15 = 15%).

maxIRR

Optional (absolute) upper bound considered valid for IRR. If null, no bound is enforced. Default is MAX_SENSIBLE_IRR.